
Extern

Function NewtonCreate:Byte Ptr(NewtonAllocMemory:Byte Ptr(sizeInBytes:Int),NewtonFreeMemory(_ptr:Byte Ptr,sizeInBytes:Int)) 
Function NewtonDestroy(newtonWorld:Byte Ptr) 
Function NewtonDestroyAllBodies(newtonWorld:Byte Ptr) 
Function NewtonGetMemoryUsed:Int() 
Function NewtonUpdate(newtonWorld:Byte Ptr,timestep:Float) 
Function NewtonInvalidateCache(newtonWorld:Byte Ptr) 
Function NewtonCollisionUpdate(newtonWorld:Byte Ptr) 
Function NewtonSetSolverModel(newtonWorld:Byte Ptr,model:Int) 
Function NewtonSetPlatformArchitecture(newtonWorld:Byte Ptr,mode:Int) 
Function NewtonGetPlatformArchitecture:Int(newtonWorld:Byte Ptr,description:Byte Ptr) 
Function NewtonSetMultiThreadSolverOnSingleIsland(newtonWorld:Byte Ptr,mode:Int) 
Function NewtonSetPerformanceClock(newtonWorld:Byte Ptr,NewtonGetTicksCountCallback:Int()) 
Function NewtonReadPerformanceTicks:Int(newtonWorld:Byte Ptr,thread:Int,performanceEntry:Int) 
Function NewtonWorldCriticalSectionLock(newtonWorld:Byte Ptr) 
Function NewtonWorldCriticalSectionUnlock(newtonWorld:Byte Ptr) 
Function NewtonSetThreadsCount(newtonWorld:Byte Ptr,threads:Int) 
Function NewtonGetThreadsCount:Int(newtonWorld:Byte Ptr) 
Function NewtonSetFrictionModel(newtonWorld:Byte Ptr,model:Int) 
Function NewtonSetMinimumFrameRate(newtonWorld:Byte Ptr,frameRate:Float) 
Function NewtonSetBodyLeaveWorldEvent(newtonWorld:Byte Ptr,NewtonBodyLeaveWorld(body:Byte Ptr,threadIndex:Int)) 
Function NewtonSetWorldSize(newtonWorld:Byte Ptr,minPoint:Float Ptr,maxPoint:Float Ptr) 
Function NewtonSetIslandUpdateEvent(newtonWorld:Byte Ptr,NewtonIslandUpdate:Int(islandHandle:Byte Ptr,bodyCount:Int)) 
Function NewtonWorldForEachJointDo(newtonWorld:Byte Ptr,NewtonJointIterator(joint:Byte Ptr)) 
Function NewtonWorldForEachBodyInAABBDo(newtonWorld:Byte Ptr,p0:Float Ptr,p1:Float Ptr,NewtonBodyIterator(body:Byte Ptr)) 
Function NewtonWorldSetUserData(newtonWorld:Byte Ptr,userData:Byte Ptr) 
Function NewtonWorldGetUserData:Byte Ptr(newtonWorld:Byte Ptr) 
Function NewtonWorldGetVersion:Int(newtonWorld:Byte Ptr) 
Function NewtonWorldRayCast(newtonWorld:Byte Ptr,p0:Float Ptr,p1:Float Ptr,NewtonWorldRayFilterCallback:Float(body:Byte Ptr,hitNormal:Float Ptr,collisionID:Int,userData:Byte Ptr,intersectParam:Float),userData:Byte Ptr,NewtonWorldRayPrefilterCallback:Int(body:Byte Ptr,collision:Byte Ptr,userData:Byte Ptr)) 
Function NewtonWorldConvexCast:Int(newtonWorld:Byte Ptr,matrix:Float Ptr,target:Float Ptr,shape:Byte Ptr,hitParam:Float Ptr,userData:Byte Ptr,NewtonWorldRayPrefilterCallback:Int(body:Byte Ptr,collision:Byte Ptr,userData:Byte Ptr),info:Byte Ptr,maxContactsCount:Int) 
Function NewtonGetBodyCount:Int(newtonWorld:Byte Ptr) 
Function NewtonIslandGetBody:Byte Ptr(island:Byte Ptr,bodyIndex:Int) 
Function NewtonIslandGetBodyAABB(island:Byte Ptr,bodyIndex:Int,p0:Float Ptr,p1:Float Ptr) 
Function NewtonMaterialCreateGroupID:Int(newtonWorld:Byte Ptr) 
Function NewtonMaterialGetDefaultGroupID:Int(newtonWorld:Byte Ptr) 
Function NewtonMaterialDestroyAllGroupID(newtonWorld:Byte Ptr) 
Function NewtonMaterialGetUserData:Byte Ptr(newtonWorld:Byte Ptr,id0:Int,id1:Int) 
Function NewtonMaterialSetSurfaceThickness(newtonWorld:Byte Ptr,id0:Int,id1:Int,thickness:Float) 
Function NewtonMaterialSetContinuousCollisionMode(newtonWorld:Byte Ptr,id0:Int,id1:Int,state:Int) 
Function NewtonMaterialSetCollisionCallback(newtonWorld:Byte Ptr,id0:Int,id1:Int,userData:Byte Ptr,NewtonOnAABBOverlap:Int(material:Byte Ptr,body0:Byte Ptr,body1:Byte Ptr,threadIndex:Int),NewtonContactProcess(contact:Byte Ptr,timestep:Float,threadIndex:Int)) 
Function NewtonMaterialSetDefaultSoftness(newtonWorld:Byte Ptr,id0:Int,id1:Int,value:Float) 
Function NewtonMaterialSetDefaultElasticity(newtonWorld:Byte Ptr,id0:Int,id1:Int,elasticCoef:Float) 
Function NewtonMaterialSetDefaultCollidable(newtonWorld:Byte Ptr,id0:Int,id1:Int,state:Int) 
Function NewtonMaterialSetDefaultFriction(newtonWorld:Byte Ptr,id0:Int,id1:Int,staticFriction:Float,kineticFriction:Float) 
Function NewtonWorldGetFirstMaterial:Byte Ptr(world:Byte Ptr) 
Function NewtonWorldGetNextMaterial:Byte Ptr(world:Byte Ptr,material:Byte Ptr) 
Function NewtonWorldGetFirstBody:Byte Ptr(world:Byte Ptr) 
Function NewtonWorldGetNextBody:Byte Ptr(world:Byte Ptr,curBody:Byte Ptr) 
Function NewtonMaterialGetMaterialPairUserData:Byte Ptr(material:Byte Ptr) 
Function NewtonMaterialGetContactFaceAttribute:Int(material:Byte Ptr) 
Function NewtonMaterialGetBodyCollisionID:Int(material:Byte Ptr,body:Byte Ptr) 
Function NewtonMaterialGetContactNormalSpeed:Float(material:Byte Ptr) 
Function NewtonMaterialGetContactForce(material:Byte Ptr,force:Float Ptr) 
Function NewtonMaterialGetContactPositionAndNormal(material:Byte Ptr,posit:Float Ptr,normal:Float Ptr) 
Function NewtonMaterialGetContactTangentDirections(material:Byte Ptr,dir0:Float Ptr,dir1:Float Ptr) 
Function NewtonMaterialGetContactTangentSpeed:Float(material:Byte Ptr,index:Int) 
Function NewtonMaterialSetContactSoftness(material:Byte Ptr,softness:Float) 
Function NewtonMaterialSetContactElasticity(material:Byte Ptr,restitution:Float) 
Function NewtonMaterialSetContactFrictionState(material:Byte Ptr,state:Int,index:Int) 
Function NewtonMaterialSetContactFrictionCoef(material:Byte Ptr,staticFrictionCoef:Float,kineticFrictionCoef:Float,index:Int) 
Function NewtonMaterialSetContactNormalAcceleration(material:Byte Ptr,accel:Float) 
Function NewtonMaterialSetContactNormalDirection(material:Byte Ptr,directionVector:Float Ptr) 
Function NewtonMaterialSetContactTangentAcceleration(material:Byte Ptr,accel:Float,index:Int) 
Function NewtonMaterialContactRotateTangentDirections(material:Byte Ptr,directionVector:Float Ptr) 
Function NewtonCreateNull:Byte Ptr(newtonWorld:Byte Ptr) 
Function NewtonCreateSphere:Byte Ptr(newtonWorld:Byte Ptr,radiusX:Float,radiusY:Float,radiusZ:Float,offsetMatrix:Byte Ptr) 
Function NewtonCreateBox:Byte Ptr(newtonWorld:Byte Ptr,dx:Float,dy:Float,dz:Float,offsetMatrix:Byte Ptr) 
Function NewtonCreateCone:Byte Ptr(newtonWorld:Byte Ptr,radius:Float,height:Float,offsetMatrix:Byte Ptr) 
Function NewtonCreateCapsule:Byte Ptr(newtonWorld:Byte Ptr,radius:Float,height:Float,offsetMatrix:Byte Ptr) 
Function NewtonCreateCylinder:Byte Ptr(newtonWorld:Byte Ptr,radius:Float,height:Float,offsetMatrix:Byte Ptr) 
Function NewtonCreateChamferCylinder:Byte Ptr(newtonWorld:Byte Ptr,radius:Float,height:Float,offsetMatrix:Byte Ptr) 
Function NewtonCreateConvexHull:Byte Ptr(newtonWorld:Byte Ptr,count:Int,vertexCloud:Float Ptr,strideInBytes:Int,tolerance:Float,offsetMatrix:Byte Ptr) 
Function NewtonCreateConvexHullFromMesh:Byte Ptr(newtonWorld:Byte Ptr,mesh:Byte Ptr,tolerance:Float) 
Function NewtonCreateConvexHullModifier:Byte Ptr(newtonWorld:Byte Ptr,convexHullCollision:Byte Ptr) 
Function NewtonConvexHullModifierGetMatrix(convexHullCollision:Byte Ptr,matrix:Float Ptr) 
Function NewtonConvexHullModifierSetMatrix(convexHullCollision:Byte Ptr,matrix:Float Ptr) 
Function NewtonCollisionIsTriggerVolume:Int(convexCollision:Byte Ptr) 
Function NewtonCollisionSetAsTriggerVolume(convexCollision:Byte Ptr,trigger:Int) 
Function NewtonConvexCollisionSetUserID(convexCollision:Byte Ptr,id:Int) 
Function NewtonConvexCollisionGetUserID:Int(convexCollision:Byte Ptr) 
Function NewtonConvexCollisionCalculateVolume:Float(convexCollision:Byte Ptr) 
Function NewtonConvexCollisionCalculateInertialMatrix(convexCollision:Byte Ptr,inertia:Float Ptr,origin:Float Ptr) 
Function NewtonCollisionMakeUnique(newtonWorld:Byte Ptr,collision:Byte Ptr) 
Function NewtonReleaseCollision(newtonWorld:Byte Ptr,collision:Byte Ptr) 
Function NewtonAddCollisionReference:Int(collision:Byte Ptr) 
Function NewtonCreateCompoundCollision:Byte Ptr(newtonWorld:Byte Ptr,count:Int,collisionPrimitiveArray:Byte Ptr) 
Function NewtonCreateCompoundCollisionFromMesh:Byte Ptr(newtonWorld:Byte Ptr,mesh:Byte Ptr,concavity:Float,maxShapeCount:Int) 
Function NewtonCreateUserMeshCollision:Byte Ptr(newtonWorld:Byte Ptr,minBox:Byte Ptr,maxBox:Byte Ptr,userData:Byte Ptr,NewtonUserMeshCollisionCollideCallback(collideDescData:Byte Ptr),NewtonUserMeshCollisionRayHitCallback:Float(lineDescData:Byte Ptr),NewtonUserMeshCollisionDestroyCallback(userData:Byte Ptr),NewtonUserMeshCollisionGetCollisionInfo(userData:Byte Ptr,infoRecord:Byte Ptr),NewtonUserMeshCollisionGetFacesInAABB(userData:Byte Ptr,p0:Float Ptr,p1:Float Ptr,vertexArray:Byte Ptr,vertexCount:Byte Ptr,vertexStrideInBytes:Byte Ptr,indexList:Byte Ptr,maxIndexCount:Int,userDataList:Byte Ptr)) 
Function NewtonCreateSceneCollision:Byte Ptr(newtonWorld:Byte Ptr,size:Float) 
Function NewtonSceneCollisionCreateProxy:Byte Ptr(scene:Byte Ptr,collision:Byte Ptr) 
Function NewtonSceneCollisionDestroyProxy(scene:Byte Ptr,Proxy:Byte Ptr) 
Function NewtonSceneProxySetMatrix(proxy:Byte Ptr,matrix:Float Ptr) 
Function NewtonSceneProxyGetMatrix(proxy:Byte Ptr,matrix:Float Ptr) 
Function NewtonCreateCollisionFromSerialization:Byte Ptr(newtonWorld:Byte Ptr,NewtonDeserialize(serializeHandle:Byte Ptr,buffer:Byte Ptr,size:Int),serializeHandle:Byte Ptr) 
Function NewtonCollisionSerialize(collision:Byte Ptr,NewtonSerialize(serializeHandle:Byte Ptr,buffer:Byte Ptr,size:Int),serializeHandle:Byte Ptr) 
Function NewtonCollisionGetInfo(collision:Byte Ptr,collisionInfo:Byte Ptr) 
Function NewtonCreateHeightFieldCollision:Byte Ptr(newtonWorld:Byte Ptr,width:Int,height:Int,gridsDiagonals:Int,elevationMap:Byte Ptr,attributeMap:Byte Ptr,horizontalScale:Float,verticalScale:Float) 
Function NewtonCreateTreeCollision:Byte Ptr(newtonWorld:Byte Ptr) 
Function NewtonTreeCollisionSetUserRayCastCallback(treeCollision:Byte Ptr,NewtonCollisionTreeRayCastCallback:Float(interception:Float,normal:Float Ptr,faceId:Int,usedData:Byte Ptr)) 
Function NewtonTreeCollisionBeginBuild(treeCollision:Byte Ptr) 
Function NewtonTreeCollisionAddFace(treeCollision:Byte Ptr,vertexCount:Int,vertexPtr:Float Ptr,strideInBytes:Int,faceAttribute:Int) 
Function NewtonTreeCollisionEndBuild(treeCollision:Byte Ptr,optimize:Int) 
Function NewtonTreeCollisionGetFaceAtribute:Int(treeCollision:Byte Ptr,faceIndexArray:Byte Ptr) 
Function NewtonTreeCollisionSetFaceAtribute(treeCollision:Byte Ptr,faceIndexArray:Byte Ptr,attribute:Int) 
Function NewtonTreeCollisionGetVertexListIndexListInAABB:Int(treeCollision:Byte Ptr,p0:Float Ptr,p1:Float Ptr,vertexArray:Byte Ptr,vertexCount:Byte Ptr,vertexStrideInBytes:Byte Ptr,indexList:Byte Ptr,maxIndexCount:Int,faceAttribute:Byte Ptr) 
Function NewtonStaticCollisionSetDebugCallback(staticCollision:Byte Ptr,NewtonTreeCollisionCallback(bodyWithTreeCollision:Byte Ptr,body:Byte Ptr,faceID:Int,vertexCount:Int,vertex:Float Ptr,vertexStrideInBytes:Int)) 
Function NewtonCollisionPointDistance:Int(newtonWorld:Byte Ptr,point:Byte Ptr,collision:Byte Ptr,matrix:Float Ptr,contact:Float Ptr,normal:Float Ptr) 
Function NewtonCollisionClosestPoint:Int(newtonWorld:Byte Ptr,collisionA:Byte Ptr,matrixA:Float Ptr,collisionB:Byte Ptr,matrixB:Float Ptr,contactA:Float Ptr,contactB:Float Ptr,normalAB:Float Ptr) 
Function NewtonCollisionCollide:Int(newtonWorld:Byte Ptr,maxSize:Int,collisionA:Byte Ptr,matrixA:Float Ptr,collisionB:Byte Ptr,matrixB:Float Ptr,contacts:Float Ptr,normals:Float Ptr,penetration:Float Ptr) 
Function NewtonCollisionCollideContinue:Int(newtonWorld:Byte Ptr,maxSize:Int,timestep:Byte Ptr,collisionA:Byte Ptr,matrixA:Float Ptr,velocA:Float Ptr,omegaA:Float Ptr,collisionB:Byte Ptr,matrixB:Float Ptr,velocB:Float Ptr,omegaB:Float Ptr,timeOfImpact:Float Ptr,contacts:Float Ptr,normals:Float Ptr,penetration:Float Ptr) 
Function NewtonCollisionSupportVertex(collision:Byte Ptr,dir:Float Ptr,vertex:Float Ptr) 
Function NewtonCollisionRayCast:Float(collision:Byte Ptr,p0:Float Ptr,p1:Float Ptr,normals:Float Ptr,attribute:Byte Ptr) 
Function NewtonCollisionCalculateAABB(collision:Byte Ptr,matrix:Byte Ptr,p0:Float Ptr,p1:Float Ptr) 
Function NewtonCollisionForEachPolygonDo(collision:Byte Ptr,matrix:Float Ptr,NewtonCollisionIterator(userData:Byte Ptr,vertexCount:Int,faceArray:Float Ptr,faceId:Int),useData:Byte Ptr) 
Function NewtonGetEulerAngle(matrix:Float Ptr,eulersAngles:Float Ptr) 
Function NewtonSetEulerAngle(eulersAngles:Float Ptr,matrix:Float Ptr) 
Function NewtonCalculateSpringDamperAcceleration:Float(dt:Float,ks:Float,x:Float,kd:Float,s:Float) 
Function NewtonCreateBody:Byte Ptr(newtonWorld:Byte Ptr,collision:Byte Ptr) 
Function NewtonDestroyBody(newtonWorld:Byte Ptr,body:Byte Ptr) 
Function NewtonBodyAddForce(body:Byte Ptr,force:Float Ptr) 
Function NewtonBodyAddTorque(body:Byte Ptr,torque:Float Ptr) 
Function NewtonBodyCalculateInverseDynamicsForce(body:Byte Ptr,timestep:Float,desiredVeloc:Float Ptr,forceOut:Float Ptr) 
Function NewtonBodySetMatrix(body:Byte Ptr,matrix:Float Ptr) 
Function NewtonBodySetMatrixRecursive(body:Byte Ptr,matrix:Float Ptr) 
Function NewtonBodySetMassMatrix(body:Byte Ptr,mass:Float,Ixx:Float,Iyy:Float,Izz:Float) 
Function NewtonBodySetMaterialGroupID(body:Byte Ptr,id:Int) 
Function NewtonBodySetContinuousCollisionMode(body:Byte Ptr,state:Int) 
Function NewtonBodySetJointRecursiveCollision(body:Byte Ptr,state:Int) 
Function NewtonBodySetOmega(body:Byte Ptr,omega:Float Ptr) 
Function NewtonBodySetVelocity(body:Byte Ptr,velocity:Float Ptr) 
Function NewtonBodySetForce(body:Byte Ptr,force:Float Ptr) 
Function NewtonBodySetTorque(body:Byte Ptr,torque:Float Ptr) 
Function NewtonBodySetCentreOfMass(body:Byte Ptr,com:Float Ptr) 
Function NewtonBodySetLinearDamping(body:Byte Ptr,linearDamp:Float) 
Function NewtonBodySetAngularDamping(body:Byte Ptr,angularDamp:Float Ptr) 
Function NewtonBodySetUserData(body:Byte Ptr,userData:Object) 
Function NewtonBodySetCollision(body:Byte Ptr,collision:Byte Ptr) 
Function NewtonBodyGetSleepState:Int(body:Byte Ptr) 
Function NewtonBodyGetAutoSleep:Int(body:Byte Ptr) 
Function NewtonBodySetAutoSleep(body:Byte Ptr,state:Int) 
Function NewtonBodyGetFreezeState:Int(body:Byte Ptr) 
Function NewtonBodySetFreezeState(body:Byte Ptr,state:Int) 
Function NewtonBodySetTransformCallback(body:Byte Ptr,NewtonSetTransform(body:Byte Ptr,matrix:Float Ptr,threadIndex:Int)) 
Function NewtonBodySetDestructorCallback(body:Byte Ptr,NewtonBodyDestructor(body:Byte Ptr)) 
Function NewtonBodySetForceAndTorqueCallback(body:Byte Ptr,NewtonApplyForceAndTorque(body:Byte Ptr,timestep:Float,threadIndex:Int)) 
Function NewtonBodyGetForceAndTorqueCallback:Byte Ptr(body:Byte Ptr) 
Function NewtonBodyGetUserData:Object(body:Byte Ptr) 
Function NewtonBodyGetWorld:Byte Ptr(body:Byte Ptr) 
Function NewtonBodyGetCollision:Byte Ptr(body:Byte Ptr) 
Function NewtonBodyGetMaterialGroupID:Int(body:Byte Ptr) 
Function NewtonBodyGetContinuousCollisionMode:Int(body:Byte Ptr) 
Function NewtonBodyGetJointRecursiveCollision:Int(body:Byte Ptr) 
Function NewtonBodyGetMatrix(body:Byte Ptr,matrix:Float Ptr) 
Function NewtonBodyGetRotation(body:Byte Ptr,rotation:Float Ptr) 
Function NewtonBodyGetMassMatrix(body:Byte Ptr,mass:Float Ptr,Ixx:Float Ptr,Iyy:Float Ptr,Izz:Float Ptr) 
Function NewtonBodyGetInvMass(body:Byte Ptr,invMass:Float Ptr,invIxx:Float Ptr,invIyy:Float Ptr,invIzz:Float Ptr) 
Function NewtonBodyGetOmega(body:Byte Ptr,vector:Float Ptr) 
Function NewtonBodyGetVelocity(body:Byte Ptr,vector:Float Ptr) 
Function NewtonBodyGetForce(body:Byte Ptr,vector:Float Ptr) 
Function NewtonBodyGetTorque(body:Byte Ptr,vector:Float Ptr) 
Function NewtonBodyGetForceAcc(body:Byte Ptr,vector:Float Ptr) 
Function NewtonBodyGetTorqueAcc(body:Byte Ptr,vector:Float Ptr) 
Function NewtonBodyGetCentreOfMass(body:Byte Ptr,com:Float Ptr) 
Function NewtonBodyGetLinearDamping:Float(body:Byte Ptr) 
Function NewtonBodyGetAngularDamping(body:Byte Ptr,vector:Float Ptr) 
Function NewtonBodyGetAABB(body:Byte Ptr,p0:Float Ptr,p1:Float Ptr) 
Function NewtonBodyGetFirstJoint:Byte Ptr(body:Byte Ptr) 
Function NewtonBodyGetNextJoint:Byte Ptr(body:Byte Ptr,joint:Byte Ptr) 
Function NewtonBodyGetFirstContactJoint:Byte Ptr(body:Byte Ptr) 
Function NewtonBodyGetNextContactJoint:Byte Ptr(body:Byte Ptr,contactJoint:Byte Ptr) 
Function NewtonContactJointGetFirstContact:Byte Ptr(contactJoint:Byte Ptr) 
Function NewtonContactJointGetNextContact:Byte Ptr(contactJoint:Byte Ptr,contact:Byte Ptr) 
Function NewtonContactJointGetContactCount:Int(contactJoint:Byte Ptr) 
Function NewtonContactJointRemoveContact(contactJoint:Byte Ptr,contact:Byte Ptr) 
Function NewtonContactGetMaterial:Byte Ptr(contact:Byte Ptr) 
Function NewtonBodyAddBuoyancyForce(body:Byte Ptr,fluidDensity:Float,fluidLinearViscosity:Float,fluidAngularViscosity:Float,gravityVector:Float Ptr,NewtonGetBuoyancyPlane:Int(collisionID:Byte Ptr,context:Byte Ptr,FunctionSpaceMatrix:Float Ptr,FunctionSpacePlane:Float Ptr),context:Byte Ptr) 
Function NewtonBodyAddImpulse(body:Byte Ptr,pointDeltaVeloc:Float Ptr,pointPosit:Float Ptr) 
Function NewtonJointGetUserData:Byte Ptr(joint:Byte Ptr) 
Function NewtonJointSetUserData(joint:Byte Ptr,userData:Byte Ptr) 
Function NewtonJointGetBody0:Byte Ptr(joint:Byte Ptr) 
Function NewtonJointGetBody1:Byte Ptr(joint:Byte Ptr) 
Function NewtonJointGetInfo(joint:Byte Ptr,info:Byte Ptr) 
Function NewtonJointGetCollisionState:Int(joint:Byte Ptr) 
Function NewtonJointSetCollisionState(joint:Byte Ptr,state:Int) 
Function NewtonJointGetStiffness:Float(joint:Byte Ptr) 
Function NewtonJointSetStiffness(joint:Byte Ptr,state:Float) 
Function NewtonDestroyJoint(newtonWorld:Byte Ptr,joint:Byte Ptr) 
Function NewtonJointSetDestructor(joint:Byte Ptr,NewtonConstraintDestructor(me:Byte Ptr)) 
Function NewtonConstraintCreateBall:Byte Ptr(newtonWorld:Byte Ptr,pivotPoint:Float Ptr,childBody:Byte Ptr,parentBody:Byte Ptr) 
Function NewtonBallSetUserCallback(ball:Byte Ptr,NewtonBallCallBack(ball:Byte Ptr,timestep:Float)) 
Function NewtonBallGetJointAngle(ball:Byte Ptr,angle:Float Ptr) 
Function NewtonBallGetJointOmega(ball:Byte Ptr,omega:Float Ptr) 
Function NewtonBallGetJointForce(ball:Byte Ptr,force:Float Ptr) 
Function NewtonBallSetConeLimits(ball:Byte Ptr,pin:Float Ptr,maxConeAngle:Float,maxTwistAngle:Float) 
Function NewtonConstraintCreateHinge:Byte Ptr(newtonWorld:Byte Ptr,pivotPoint:Float Ptr,pinDir:Float Ptr,childBody:Byte Ptr,parentBody:Byte Ptr) 
Function NewtonHingeSetUserCallback(hinge:Byte Ptr,NewtonHingeCallBack:Int(hinge:Byte Ptr,desc:Byte Ptr)) 
Function NewtonHingeGetJointAngle:Float(hinge:Byte Ptr) 
Function NewtonHingeGetJointOmega:Float(hinge:Byte Ptr) 
Function NewtonHingeGetJointForce(hinge:Byte Ptr,force:Float Ptr) 
Function NewtonHingeCalculateStopAlpha:Float(hinge:Byte Ptr,desc:Byte Ptr,angle:Float) 
Function NewtonConstraintCreateSlider:Byte Ptr(newtonWorld:Byte Ptr,pivotPoint:Float Ptr,pinDir:Float Ptr,childBody:Byte Ptr,parentBody:Byte Ptr) 
Function NewtonSliderSetUserCallback(slider:Byte Ptr,NewtonSliderCallBack:Int(slider:Byte Ptr,desc:Byte Ptr)) 
Function NewtonSliderGetJointPosit:Float(slider:Byte Ptr) 
Function NewtonSliderGetJointVeloc:Float(slider:Byte Ptr) 
Function NewtonSliderGetJointForce(slider:Byte Ptr,force:Float Ptr) 
Function NewtonSliderCalculateStopAccel:Float(slider:Byte Ptr,desc:Byte Ptr,position:Float) 
Function NewtonConstraintCreateCorkscrew:Byte Ptr(newtonWorld:Byte Ptr,pivotPoint:Float Ptr,pinDir:Float Ptr,childBody:Byte Ptr,parentBody:Byte Ptr) 
Function NewtonCorkscrewSetUserCallback(corkscrew:Byte Ptr,NewtonCorkscrewCallBack:Int(corkscrew:Byte Ptr,desc:Byte Ptr)) 
Function NewtonCorkscrewGetJointPosit:Float(corkscrew:Byte Ptr) 
Function NewtonCorkscrewGetJointAngle:Float(corkscrew:Byte Ptr) 
Function NewtonCorkscrewGetJointVeloc:Float(corkscrew:Byte Ptr) 
Function NewtonCorkscrewGetJointOmega:Float(corkscrew:Byte Ptr) 
Function NewtonCorkscrewGetJointForce(corkscrew:Byte Ptr,force:Float Ptr) 
Function NewtonCorkscrewCalculateStopAlpha:Float(corkscrew:Byte Ptr,desc:Byte Ptr,angle:Float) 
Function NewtonCorkscrewCalculateStopAccel:Float(corkscrew:Byte Ptr,desc:Byte Ptr,position:Float) 
Function NewtonConstraintCreateUniversal:Byte Ptr(newtonWorld:Byte Ptr,pivotPoint:Float Ptr,pinDir0:Float Ptr,pinDir1:Float Ptr,childBody:Byte Ptr,parentBody:Byte Ptr) 
Function NewtonUniversalSetUserCallback(universal:Byte Ptr,NewtonUniversalCallBack:Int(universal:Byte Ptr,desc:Byte Ptr)) 
Function NewtonUniversalGetJointAngle0:Float(universal:Byte Ptr) 
Function NewtonUniversalGetJointAngle1:Float(universal:Byte Ptr) 
Function NewtonUniversalGetJointOmega0:Float(universal:Byte Ptr) 
Function NewtonUniversalGetJointOmega1:Float(universal:Byte Ptr) 
Function NewtonUniversalGetJointForce(universal:Byte Ptr,force:Float Ptr) 
Function NewtonUniversalCalculateStopAlpha0:Float(universal:Byte Ptr,desc:Byte Ptr,angle:Float) 
Function NewtonUniversalCalculateStopAlpha1:Float(universal:Byte Ptr,desc:Byte Ptr,angle:Float) 
Function NewtonConstraintCreateUpVector:Byte Ptr(newtonWorld:Byte Ptr,pinDir:Float Ptr,body:Byte Ptr) 
Function NewtonUpVectorGetPin(upVector:Byte Ptr,pin:Float Ptr) 
Function NewtonUpVectorSetPin(upVector:Byte Ptr,pin:Byte Ptr) 
Function NewtonConstraintCreateUserJoint:Byte Ptr(newtonWorld:Byte Ptr,maxDOF:Int,NewtonUserBilateralCallBack(userJoint:Byte Ptr,timestep:Float,threadIndex:Int),NewtonUserBilateralGetInfoCallBack(userJoint:Byte Ptr,info:Byte Ptr),childBody:Byte Ptr,parentBody:Byte Ptr) 
Function NewtonUserJointSetFeedbackCollectorCallback(joint:Byte Ptr,NewtonUserBilateralCallBack(userJoint:Byte Ptr,timestep:Float,threadIndex:Int)) 
Function NewtonUserJointAddLinearRow(joint:Byte Ptr,pivot0:Byte Ptr,pivot1:Byte Ptr,dir:Byte Ptr) 
Function NewtonUserJointAddAngularRow(joint:Byte Ptr,relativeAngle:Float,dir:Byte Ptr) 
Function NewtonUserJointAddGeneralRow(joint:Byte Ptr,jacobian0:Byte Ptr,jacobian1:Byte Ptr) 
Function NewtonUserJointSetRowMinimumFriction(joint:Byte Ptr,friction:Float) 
Function NewtonUserJointSetRowMaximumFriction(joint:Byte Ptr,friction:Float) 
Function NewtonUserJointSetRowAcceleration(joint:Byte Ptr,acceleration:Float) 
Function NewtonUserJointSetRowSpringDamperAcceleration(joint:Byte Ptr,springK:Float,springD:Float) 
Function NewtonUserJointSetRowStiffness(joint:Byte Ptr,stiffness:Float) 
Function NewtonUserJointGetRowForce:Float(joint:Byte Ptr,row:Int) 
Function NewtonMeshCreate:Byte Ptr() 
Function NewtonMeshCreateFromCollision:Byte Ptr(collision:Byte Ptr) 
Function NewtonMeshDestroy(NewtonMeshmesh:Byte Ptr) 
Function NewtonMeshCalculateVertexNormals(mesh:Byte Ptr,angleInRadians:Float) 
Function NewtonMeshApplySphericalMapping(mesh:Byte Ptr,material:Int) 
Function NewtonMeshApplyBoxMapping(mesh:Byte Ptr,front:Int,side:Int,top:Int) 
Function NewtonMeshApplyCylindricalMapping(mesh:Byte Ptr,cylinderMaterial:Int,capMaterial:Int) 
Function NewtonMeshPlaneClip:Int(mesh:Byte Ptr,plane:Float Ptr,textureProjectionMatrix:Float Ptr,meshOut:Byte Ptr,maxMeshCount:Int,capMaterial:Int) 
Function NewtonMeshBeginFace(mesh:Byte Ptr) 
Function NewtonMeshAddFace(mesh:Byte Ptr,vertexCount:Int,vertex:Float Ptr,strideInBytes:Int,materialIndex:Int) 
Function NewtonMeshEndFace(mesh:Byte Ptr) 
Function NewtonMeshGetVertexCount:Int(mesh:Byte Ptr) 
Function NewtonMeshGetVertexStreams(mesh:Byte Ptr,vertexStrideInByte:Int,vertex:Float Ptr,normalStrideInByte:Int,normal:Float Ptr,uvStrideInByte:Int,uv:Float Ptr) 
Function NewtonMeshGetIndirectVertexStreams(mesh:Byte Ptr,vertexStrideInByte:Int,vertex:Float Ptr,vertexIndices:Byte Ptr,vertexCount:Byte Ptr,normalStrideInByte:Int,normal:Float Ptr,normalIndices:Byte Ptr,normalCount:Byte Ptr,uvStrideInByte:Int,uv:Float Ptr,uvIndices:Byte Ptr,uvCount:Byte Ptr) 
Function NewtonMeshFirstMaterial:Int(mesh:Byte Ptr) 
Function NewtonMeshNextMaterial:Int(mesh:Byte Ptr,materialHandle:Int) 
Function NewtonMeshMaterialGetMaterial:Int(mesh:Byte Ptr,materialHandle:Int) 
Function NewtonMeshMaterialGetIndexCount:Int(mesh:Byte Ptr,materialHandle:Int) 
Function NewtonMeshMaterialGetIndexStream(mesh:Byte Ptr,materialHandle:Int,index:Byte Ptr) 
Function NewtonMeshMaterialGetIndexStreamShort(mesh:Byte Ptr,materialHandle:Int,index:Byte Ptr) 

End Extern